package algotithm.acwing.test838;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author zhouyanxiang
 * @Date 2021-01-2021/1/8-16:06
 */
public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] str = reader.readLine().split(" ");
        int n = Integer.parseInt(str[0]);
        int m = Integer.parseInt(str[1]);
        int[] arr = new int[n];
        String[] str2 = reader.readLine().split(" ");
        for (int i = 0; i < n; i++) {
            arr[i] = Integer.parseInt(str2[i]);
        }


    }

    public void buildHeap(int[] nums) {
        for (int i = nums.length/2-1; i <nums.length ; i++) {

        }
    }

    public void maximumHeap(int[] arr,int i, int length) {
        int tmp = arr[i];
        for (int j = 2 * i + 1; j < length ; j = 2 * j + 1) {
            if (j + 1 < length && arr[j] < arr[j+1]) {
                j++;
            }
            if (arr[j] > tmp) {
                arr[i] = arr[j];
                i = j;
            }
        }
    }



    public void swap(int[] arr,int a,int b) {
        int tmp = arr[a];
        arr[a] = arr[b];
        arr[b] = tmp;
    }


}
